revision:
The property returns a node object. The property is read-only.
Syntax:
element.nextSibling or node.nextSibling: the next sibling of the element; "null" if no next sibling exists.
property value:
none :
example
The HTML content of the next sibling of the first list item is :
Note: Whitespace between elements is considered text nodes.
If you add whitespace between the two li elements, the result will be "undefined".
<div>
<ul><li id="item1">Coffee (first item)</li><li id="item2">Tea (second item)</li></ul>
<p>The HTML content of the next sibling of the first list item is : <span id="prop">
</span></p>
<p style="font-size: 0.9vw;"><strong>Note:</strong> Whitespace between elements is
considered text nodes.<br>
If you add whitespace between the two li elements, the result will be "undefined".</p>
</div>
<script>
let text = document.getElementById("item1").nextSibling.innerHTML;
document.getElementById("prop").innerHTML = text;
</script>